package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.Account;

public class AccountMapper implements RowMapper<Account> {

	@Override
	public Account mapRow(ResultSet rs, int arg1) throws SQLException {
		Account account = new Account();
		account.setUserID(rs.getInt("userID"));
		account.setAccount(rs.getString("account"));
		account.setPwd(rs.getString("pwd"));
		account.setSecretQuestion(rs.getString("secretQuestion"));
		account.setSecretAnswer(rs.getString("secretAnswer"));
		account.setLastPwd("lastPwd");
		account.setLastPwdChange("lastPwdChange");
		return account;
	}

}
